<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>Title</title>
    <meta content="" charset="UTF-8">
    <script language="JavaScript" src="script/vue.js"></script>
    <script type="" language="JavaScript">
        window.onload = function () {
            var vue = new Vue({
                    // # 表示id
                    // . 表示class
                    "el": "#div0",
                    "data": {
                        num1: 1,
                        num2: 2,
                        num3: 0
                    }, watch: {
                        num1: function (newValue) {
                            this.num3 = parseInt(newValue) + parseInt(this.num2);
                        },
                        num2: function (newValue) {
                            this.num3 = parseInt(this.num1) + parseInt(newValue);
                        }
                    }
                })
            ;
        }
    </script>
</head>
<body>
<div id="div0">
    <span>{{msg}}</span><br/>
    <input type="text" v-model="num1"></input>
    +
    <input type="text" v-model="num2"></input>
    =
    <span>{{num3}}</span>

</div>
</body>
</html>